<div style="border: 3px solid gray; float: left; padding:5px;">
<?php
	myPrint($_SESSION, '$_SESSION');
	myPrint( Form::$values, 'Form::$values'); myPrint( Form::$errors, 'Form::$errors');
	$parse_url = Page::parse_url( $_SERVER['REQUEST_URI'] );

	if(!empty($_SESSION['user']['sign'])) {
		$out = 'Hello, '.$_SESSION['user']['ud_name'].' '.$_SESSION['user']['ud_surname'].'<br/>'.
			( IS_ADMIN ? '<a href="/admin" data-noajax="1">Админка</a>' : '' ).
			' <a style="cursor:pointer;" href="?logout=1" data-noajax="1">Выйти</a>';
		echo $out;
	} else 
	if($parse_url['path']!='/login.php'){
		echo '<span style="cursor:pointer;" onclick="document.getElementById(\'auth_form\').style.display=\'block\'">Войти</a>';
	}
	//echo serialize( array('1') );
?>
</div>
<div style="clear:both;"></div>

<?php
	
	if($parse_url['path']!='/login.php') {
?>
	<div id="auth_form" style="display:<?php 
	echo (count( Form::errorsAll('login_form_') )>0 || $parse_url['path']=='/login.php') ?'block': 'none' 
	?>; position:fixed;top:40%;left:40%;background-color:white; border: 3px solid gray;padding:5px;">
	<div style="cursor:pointer;float:right;color:red;" class="close_button" onclick="this.parentNode.style.display='none';"></div>
	<!--Module::Auth()-->
	</div>
<?php } ?>
